﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DAL_Class;
namespace NLLSite.Administrator.UserControl
{
    public partial class AddNewSlide : System.Web.UI.UserControl
    {
        Slide slid = new Slide();
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button3_Click(object sender, EventArgs e)
        {
            SLIDE sli = new SLIDE();
            sli.SlideImage = Txtimgslide.Text;
            sli.ThumbImage = TxtimgThb.Text;
            sli.Description = Txtdes.Text;
            sli.Link = Txtlink.Text;
            if (Cbxsta.Checked)
            {
                sli.Status = true;
            }
            else { sli.Status = false; }
           lblchk.Text = slid.AddNewSlide(sli);
           Response.Redirect("QuanLySlide.aspx");
        }

        protected void Button4_Click(object sender, EventArgs e)
        {
            Txtimgslide.Text = string.Empty;
            TxtimgThb.Text = string.Empty;
            Txtdes.Text = string.Empty;
            Txtlink.Text = string.Empty;
            lblchk.Text = string.Empty;
        }
    }
}